home *** CD-ROM | disk | FTP | other *** search
/ What CD? 12 / What PC June 1997.iso / multi / cyber / cyber95 / _setup.1 / WEB3.POP < prev    next >
Encoding:
Text File  |  1996-09-04  |  1.9 KB  |  79 lines

  1. // web3.pop
  2. // describes a form based on William Latham's "Web Forms"
  3. // extends upon web.pop by adding rotational commands to horn forms
  4. // extends upon web1.pop by adding vector-egg-scaling
  5. // extends upon web2.pop bt adding transparency
  6.  
  7. population 0
  8. dimensions = 1
  9. colour_model RGB
  10. render_quality flat
  11.  
  12. genome 0 {
  13.  
  14.     // top level structure iterates in a circle, creating outward pointing spokes
  15.     setScalarMem( 0, 5 : 3 : 10 ),  // mem[0] = #spokes
  16.     branchFor(
  17.         getScalarMem(0),
  18.         1,        // mem[1] = current spoke [ 0 ... #spokes-1]
  19.  
  20.         // inter-spoke code - rotates in a circle
  21.         *join(
  22.             swivelLeft( div(dtor(360), getScalarMem(0)) ),
  23.             bankLeft( dtor(5:0:60) )
  24.         ),
  25.  
  26.         // spoke code - creates a horn form jutting out at right angles to
  27.         // main circle and then branches smaller sub-horns at right angles
  28.         join(
  29.             swivelRight( dtor(90) ),
  30.  
  31.             // major horn form
  32.             *scope(
  33.                 eggScale( 1 : .5 : 1.5 ),
  34.                 repeat(
  35.                     3 : 2 : 20,
  36.                     join(
  37.                         forward( .5 : 0.01 : 0.6 ),
  38.                         moveHue( .1 : -.2 : .2 ),
  39.                         bankLeft( dtor(5:0:30) ),
  40.                         eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
  41.                         lay
  42.                     )
  43.                 )
  44.             ), // end major horn form
  45.  
  46.             // minor branches
  47.             eggScale( 1 : .5 : 1.5 ),
  48.             *repeat(
  49.                 3 : 2 : 20,
  50.  
  51.                 join(
  52.                     forward( .5 : 0.01 : 0.6 ),
  53.                     bankLeft( dtor(5:0:30) ),
  54.  
  55.                     // minor horn-form
  56.                     *scope(
  57.                         swivelRight( dtor(90) ),
  58.                         scale( .5 : 0.1 : 1.3 ),
  59.                         repeat(
  60.                             8 : 2 : 40,
  61.                             join( 
  62.                                 forward( .5 : 0.05 : 0.6 ),
  63.                                 moveHue( .1 : -.2 : .2 ),
  64.                                 bankLeft( dtor(5:0:30) ),
  65.                                 eggVectorScale( <1,1,1> : <.5,.5,.5> : <1.5,1.5,1.5> ),
  66.                                 moveAlpha( .1 : 0.01 : 0.3 ),
  67.                                 lay
  68.                             )
  69.                         )
  70.                     ) // end minor horn form
  71.                 )
  72.             ) // end minor branches
  73.     
  74.         )  // end spoke code
  75.     ) // end web 'branchFor'
  76. }
  77.  
  78. // eof : web3.pop
  79.